home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / p_pascal.zip / SAMPLES / MAX.PAS < prev    next >
Pascal/Delphi Source File  |  1989-04-22  |  277b  |  15 lines

  1. (*$c+*)
  2. program example(input,output);
  3. var x,y : integer;
  4. function max(z,w : integer) : integer;
  5. begin
  6.     if z < w then max := w
  7.     else
  8.         max := z
  9. end;
  10. begin
  11.     write('Type: x= '); readln(x);
  12.     write('Type: y= '); readln(y);
  13.     writeln('max = ', max(x, y) : 3, '.')
  14. end.
  15.